 <div class="headerCSS"><center>Knowledge Cache</center></div>

 
 <%@ page import="java.util.*" %>
<%@ page import="jpa.*" %>
<%@ page import="javax.naming.*" %>

<%
	IStatelessBean stateless = (IStatelessBean)session.getAttribute("sessionBean");
	IStatefulBean stateful = (IStatefulBean)session.getAttribute("statefulBean");
%>

<%	
	System.out.println(stateful.getLoggedIn());
	if(!stateful.getLoggedIn())
	{
		System.out.println("Set to false");
%>
 

 
<div class="loginCSS"><a href="Controller?do=register">register</a></div> 
<div class="registerCSS"><a href="Controller?do=login">login</a></div>



<%
	}
	else
	{
		System.out.println("Set to true");		
%>
	<div class="logoutCSS"><a href="Controller?do=logoff">Logout</a></div>	
	
	<%
	} 
	%>
</div>
<div id="menu">
 <ul>
  <li><div class="menuBox"><a href="Controller?do=index">Home</a></div></li>
  <li><div class="menuBox"><a href="Controller?do=tour">Tour</a> </div></li>
  <li><div class="menuBox"><a href="Controller?do=viewCache">View Cache</a></div></li>
  <li><div class="menuBox"><a href="Controller?do=search">Search</a></div></li>
  <%
  		if(stateful.getLoggedIn())
  		{
  %>
  <li><div class="menuBox"><a href="Controller?do=profile">Profile</a></div></li> 
  <li><div class="menuBox"><a href="Controller?do=createCachePage">Create Cache</a></div></li>
  <%
  		}
  
  		if(stateful.getLoggedInMember() != null && stateful.getAdminStatus() == 1)
  		{
  %>  
  <li><div class="menuBox"><a href="Controller?do=admin">Admin</a></div></li>   
  <%
  		}
  %>
 </ul>
</div>
<br /><br />
<%
if(stateful.getLoggedIn() == true)
{ %>
<div class="helloUser">Welcome, <strong><%=stateful.getLoggedInMember().getMemName()%></strong>!</div>

<% } %>

<br class="clearBoth"/>